package com.kaifa.test;

/**
 * 冒泡排序
 */
public class WorkDemo3 {

    public static void main(String[] args) {
        String str = "123,0,1,34,56,78,9,3,56";
//        分割
        String[] strs = str.split("\\,");
//        System.out.println(strs.length);
        String ss = "";
        for (int i = strs.length-1;i>0;i--){
            for(int j=0; j<i;j++){

                int n = Integer.parseInt(strs[j]);
                int m = Integer.parseInt(strs[j+1]);
                if(n>m){
                    ss = strs[j];
                    strs[j] = strs[j+1];
                    strs[j+1] = ss;
                }
            }

        }
        for(String dd:strs){
            System.out.println(dd);
        }






    }
}
